﻿#ifndef SCOREBOARD_H
#define SCOREBOARD_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QPainter>
#include <QGridLayout>
#include <QTimer>
#include <QStyle>
#include <QVBoxLayout>

#include "tetrispiece.h"

class Scoreboard : public QWidget
{
    Q_OBJECT
public:
    explicit Scoreboard(QWidget *parent = nullptr);

    void setNextPiece(const TetrisPiece &piece);
    void setScore(int score);
    void setLevel(int level);
    void setLinesRemoved(int count);

signals:
    void startGame();
    void pauseGame();

private:
    void drawNextPiece();

    QLabel *scoreLabel;
    QLabel *levelLabel;
    QLabel *linesLabel;
    QLabel *nextPieceLabel; // 用于显示文字"下一个方块"
    QLabel *nextPieceDisplay;  // 专门用于显示下一个方块的图像
    QPushButton *startButton;
    QPushButton *pauseButton;
    // QWidget *nextPieceArea;
    TetrisPiece nextPiece;

};

#endif // SCOREBOARD_H
